package org.yzh.web.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.yzh.web.mapper.DeviceMapper;
import org.yzh.web.model.entity.DeviceDO;

@Service
public class DeviceService {
    private static final Logger log = LoggerFactory.getLogger(DeviceService.class.getSimpleName());
    @Autowired
    private DeviceMapper deviceMapper;

    public void insert(DeviceDO device){
        DeviceDO tempDevice = deviceMapper.getByMobileNo(device.getMobileNo());
        if(tempDevice == null){
            deviceMapper.insert(device);
        }
    }

}
